home *** CD-ROM | disk | FTP | other *** search
/ Halting the Hacker - A P…uide to Computer Security / Halting the Hacker - A Practical Guide to Computer Security.iso / rfc / rfc1025.txt < prev    next >
Text File  |  1997-04-01  |  11KB  |  339 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          J. Postel
  8. Request for Comments: 1025                                           ISI
  9.                                                           September 1987
  10.  
  11.  
  12.                           TCP AND IP BAKE OFF
  13.  
  14.  
  15. Status of This Memo
  16.  
  17.    This memo describes some of the procedures, scoring, and tests used
  18.    in the TCP and IP bake offs held in the early development of these
  19.    protocols.  These procedures and tests may still be of use in testing
  20.    newly implemented TCP and IP modules.  Distribution of this memo is
  21.    unlimited.
  22.  
  23. Introduction
  24.  
  25.    In the early days of the development of TCP and IP, when there were
  26.    very few implementations and the specifications were still evolving,
  27.    the only way to determine if an implementation was "correct" was to
  28.    test it against other implementations and argue that the results
  29.    showed your own implementation to have done the right thing.  These
  30.    tests and discussions could, in those early days, as likely change
  31.    the specification as change the implementation.
  32.  
  33.    There were a few times when this testing was focused, bringing
  34.    together all known implementations and running through a set of tests
  35.    in hopes of demonstrating the N squared connectivity and correct
  36.    implementation of the various tricky cases.  These events were called
  37.    "Bake Offs".
  38.  
  39.    An early version of the list of tests included here appears in IEN-69
  40.    of October 1978.  A demonstration of four TCP implementations was
  41.    held at the Defense Communication Engineering Center in Reston,
  42.    Virginia on 4 December 1978, and reported in IEN-70 of December 1978.
  43.    A bake off of six implementations was held 27-28 January 1979 at
  44.    USC-Information Sciences Institute in Marina del Rey, California and
  45.    reported in IEN-77 of February 1979.  And a distributed bake off was
  46.    held in April 1980 over the network and reported in IEN-145 of May
  47.    1980.
  48.  
  49.    The following section reproduces (with very slight editing) the
  50.    procedure, tests, and scoring of the April 1980 Bake Off.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Postel                                                          [Page 1]
  59.  
  60. RFC 1025                  TCP and IP Bake Off             September 1987
  61.  
  62.  
  63. Procedure
  64.  
  65.    This is the procedure for the TCP and IP Bake Off.  Each implementor
  66.    of a TCP and IP is to perform the following tests and to report the
  67.    results.  In general, this is done by using a test program or user
  68.    Telnet program to open connections to your own or other TCP
  69.    implementations.
  70.  
  71.    Some test are made more interesting by the use of a "flakeway".  A
  72.    flakeway is a purposely flakey gateway.  It should have control
  73.    parameters that can be adjusted while it is running to specify a
  74.    percentage of datagrams to be dropped, a percentage of datagrams to
  75.    be corrupted and passed on, and a percentage of datagrams to be
  76.    reordered so that they arrive in a different order than sent.
  77.  
  78.    Many of the following apply for each distinct TCP contacted (for
  79.    example, in the Middleweight Division there is a possibility of 20
  80.    points for each other TCP in the Bake Off).
  81.  
  82.    Note Bene: Checksums must be enforced.  No points will be awarded if
  83.    the checksum test is disabled.
  84.  
  85.       Featherweight Division
  86.  
  87.          1 point for talking to yourself (opening a connection).
  88.  
  89.          1 point for saying something to yourself (sending and receiving
  90.          data).
  91.  
  92.          1 point for gracefully ending the conversation (closing the
  93.          connection without crashing).
  94.  
  95.          2 points for repeating the above without reinitializing the
  96.          TCP.
  97.  
  98.          5 points for a complete conversation via the testing gateway.
  99.  
  100.       Middleweight Division
  101.  
  102.          2 points for talking to someone else (opening a connection).
  103.  
  104.          2 points for saying something to someone else (sending and
  105.          receiving data).
  106.  
  107.          2 points for gracefully ending the conversation (closing the
  108.          connection without crashing).
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Postel                                                          [Page 2]
  115.  
  116. RFC 1025                  TCP and IP Bake Off             September 1987
  117.  
  118.  
  119.          4 points for repeating the above without reinitializing the
  120.          TCP.
  121.  
  122.          10 points for a complete conversation via the testing gateway.
  123.  
  124.       Heavyweight Division
  125.  
  126.          10 points for being able to talk to more than one other TCP at
  127.          the same time (multiple connections open and active
  128.          simultaneously with different TCPs).
  129.  
  130.          10 points for correctly handling urgent data.
  131.  
  132.          10 points for correctly handling sequence number wraparound.
  133.  
  134.          10 points for correctly being able to process a "Kamikaze"
  135.          packet (AKA nastygram, christmas tree packet, lamp test
  136.          segment, et al.).  That is, correctly handle a segment with the
  137.          maximum combination of features at once (e.g., a SYN URG PUSH
  138.          FIN segment with options and data).
  139.  
  140.          30 points for KOing your opponent with legal blows.  (That is,
  141.          operate a connection until one TCP or the other crashes, the
  142.          surviving TCP has KOed the other.  Legal blows are segments
  143.          that meet the requirements of the specification.)
  144.  
  145.          20 points for KOing your opponent with dirty blows.  (Dirty
  146.          blows are segments that violate the requirements of the
  147.          specification.)
  148.  
  149.          10 points for showing your opponents checksum test is faulty or
  150.          disabled.
  151.  
  152.       Host & Gateway IP Division
  153.  
  154.          25 points for doing fragmentation and reassembly.
  155.  
  156.          15 points for doing loose source route option.
  157.  
  158.          15 points for doing strict source route option.
  159.  
  160.          10 points for doing return route option.
  161.  
  162.          10 points for using source quench messages.
  163.  
  164.          10 points for using routing advice messages.
  165.  
  166.          5 points for doing something with the type of service.
  167.  
  168.  
  169.  
  170. Postel                                                          [Page 3]
  171.  
  172. RFC 1025                  TCP and IP Bake Off             September 1987
  173.  
  174.  
  175.          5 points for doing something with the security option.
  176.  
  177.          5 points for doing something with the timestamp option.
  178.  
  179.          5 points for showing that a gateway forwards datagrams without
  180.          decreasing the time to live (showing a gateway is faulty).
  181.  
  182.          5 points for showing that a gateway forwards datagrams with the
  183.          time to live equal zero (showing a gateway is faulty).
  184.  
  185.          10 points for showing that a gateway or hosts checksum test is
  186.          faulty or disabled (showing a gateway is faulty).
  187.  
  188.       Bonus Points
  189.  
  190.          10 points for the best excuse.
  191.  
  192.          20 points for the fewest excuses.
  193.  
  194.          30 points for the longest conversation.
  195.  
  196.          40 points for the most simultaneous connections.
  197.  
  198.          50 points for the most simultaneous connections with distinct
  199.          TCPs.
  200.  
  201.    Tests
  202.  
  203.       The following tests have been identified for checking the
  204.       capabilities of a TCP implementation.  These may be useful in
  205.       attempting to KO an opponent.
  206.  
  207.          1.  Single connection.  Open & close a single connection many
  208.              times.
  209.  
  210.          2.  Multi connections.  Open several connections
  211.              simultaneously.  Two connections to the same socket
  212.              (i.e., a-b and a-c) check proper separation of data.
  213.  
  214.          3.  Half Open Connection.  Open a connection, crash local TCP
  215.              and attempt to open same connection again.
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Postel                                                          [Page 4]
  227.  
  228. RFC 1025                  TCP and IP Bake Off             September 1987
  229.  
  230.  
  231.          4.  Piggy-back Loop.  Open connections via Telnet.
  232.  
  233.          user telnet--->TCP--->IP--->net--->IP--->TCP--->server telnet
  234.                                                                |
  235.                                                                V
  236.          server telnet<---TCP<---IP<---net<---IP<---TCP<---user telnet
  237.               |
  238.               V
  239.          user telnet--->...
  240.  
  241.          5.  Maximum connections.  Open connections between a pair of
  242.              TCP until refused or worse.
  243.  
  244.          6.  Refused connection.  Open a connection to a non-accepting
  245.              socket, does it get refused?
  246.  
  247.          7.  Zero Window.  Try to send data to a TCP that is presenting
  248.              a zero window.
  249.  
  250.          8.  Fire Hose.  Make many connections to data source ports, or
  251.              connections to a data sink and send as fast as you can.
  252.  
  253.          9.  Urgent Test.  Try to send data to a user program that only
  254.              receives data when in urgent mode.
  255.  
  256.          10. Kamikazi Segment.  Send and receive nastygrams.  A
  257.              nastygram is a segment with SYN, EOL, URG, and FIN on and
  258.              carrying one octet of data.
  259.  
  260.          11. Sequence Wraparound.  Test proper functioning when sequence
  261.              numbers (a) pass 2**31 (i.e., go from plus to "minus") and
  262.              (b) pass 2**32 (i.e., go from 2**32-1 to 0).
  263.  
  264.          12. Buffer size.  With buffer size not equal to one, send data
  265.              in segments of various sizes, use urgent occasionally.
  266.  
  267.          13. Send a nastygram into a half open connection when the
  268.              sequence number is about to wrap around.
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Postel                                                          [Page 5]
  283.  
  284. RFC 1025                  TCP and IP Bake Off             September 1987
  285.  
  286.  
  287. New Ideas
  288.  
  289.    The above tests check for basic operation and handling of some of the
  290.    tricky cases.  They do not consider performance in any way, or check
  291.    to see if some of the recently developed ideas have been implemented.
  292.  
  293.       New Mechanisms
  294.  
  295.          1.  The John Nagel Procedures (RFC-896).
  296.  
  297.          2.  The Van Jacobson Procedures (slow start, RTT measurements,
  298.              etc).
  299.  
  300.          3.  The SQuID Procedures (RFC-1016).
  301.  
  302.       Performance Tests
  303.  
  304.          Performance tests are difficult to specify because the results
  305.          depend so much on the state of the environment of the test.
  306.          Here are a few possibilities:
  307.  
  308.          1.  FTP Throughput:  Send a 1 megabyte file to a locally nearby
  309.              machine on an Ethernet measuring the elapsed time.
  310.  
  311.          2.  FTP Throughput:  Send a 1 megabyte file to a locally nearby
  312.              machine on an ARPANET measuring the elapsed time.
  313.  
  314.          3.  NETBLT Throughput:  Send a 1 megabyte file to a locally
  315.              nearby machine on an Ethernet measuring the elapsed time.
  316.  
  317.          4.  NETBLT Throughput:  Send a 1 megabyte file to a locally
  318.              nearby machine on an ARPANET measuring the elapsed time.
  319.  
  320.          5.  Character Test:  Use a test program to send a character via
  321.              TCP to the Echo Server (RFC-862), time the round trip (from
  322.              the time the character is sent until the echo is returned
  323.              to the test program).
  324.  
  325. Appendix
  326.  
  327.    For History Buffs Only:
  328.  
  329.       The following item was in the original 1980 tests, but has been
  330.       moved to this appendix since it no longer applies.
  331.  
  332.          10 points for correctly handling rubber baby buffer bumpers in
  333.          both directions (End of Letter sequence number adjustments).
  334.  
  335.  
  336.  
  337.  
  338. Postel                                                          [Page 6]
  339.